(function($){
    
    $.set.sp_form = {
        
        
        
    }
    
    $.fn.sp_form = function(arg1){
        con.log("lols")
        var set = $.extend({
            
            action_type:function(url){
                var first_char = url.substr(0,1);
                
                return (first_char == "?") ?  "qs" : "hash";
            }
            
        },$.set.sp_form,arg1);
        con.log(this);
        return this.each(function(){
            
            con.log("sp_form | init");
            
            var $this = $(this);
            
            var action = $this.attr("action");
            con.log(set.action_type(action))
            if(set.action_type(action) == "qs"){
                con.log("querystring")
                $this.ajaxForm(arg1)
                
            }else{
                
                var form = {
                    
                    submit : function(){
                        
                        var dyna_content_set = $.set.dyna_content;
                        
                        var re_req = dyna_content_set.re_req;
                        
                        dyna_content_set.re_req = true;// re_request the page.
                        
                        var $this = $(this)
                        var url = $this.attr("action");
                        dyna_content_post = $this.dom_get(); // get all of the elements.
                        location.href=url;
                        
                        return false;
                        dyna_content_set.re_req = re_req; // back to old settings.
                        
                        return false;
                        
                    }
                    
                }
                
                con.log("hash"); 
                
                $this.submit(form.submit); //disabled submit
                
                
            }
            
        });
    }
        
})(jQuery)